using UnityEngine;

public class RODOPrivacyMenu : MonoBehaviour, IBackAction, IOnEndAnimation
{
	private Animator anim;

	private Globals globals;

	private AudioController audio;

	private UserPreferences userPrefernces;

	public void Awake()
	{
		anim = GetComponent<Animator>();
		globals = Globals.instance;
		userPrefernces = UserPreferences.instance;
		audio = AudioController.instance;
		globals.backManager.RegisterObject(this);
	}

	public void OnClickCancelConsent()
	{
		audio.Play("button");
		GameObject original = Resources.Load<GameObject>("RODO_CancelConsent_Sucessfully");
		GameObject gameObject = UnityEngine.Object.Instantiate(original);
		anim.SetTrigger("Hide");
	}

	public void OnClickPrivacy()
	{
		audio.Play("button");
		AnalyticsController.SpecialButtonPressed(SpecialButtonType.OptionsPolicyPrivacy);
	//	Application.OpenURL(globals.privacyPolicyLink);
	}

	public void OnBackAction()
	{
		audio.Play("button");
		anim.SetTrigger("Hide");
	}

	public void OnEndAnimation()
	{
		globals.backManager.UnregisterObject(this);
		UnityEngine.Object.Destroy(base.gameObject);
	}
}
